package com.hyt.it.ogt.ykcj.mapper.grade;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.hyt.it.ogt.ykcj.domain.grade.ServantExamineeSubjectGrade;
import com.hyt.it.ogt.ykcj.domain.vo.ExamScoreLineReq;
import com.hyt.it.ogt.ykcj.domain.vo.GradeAnalysisTotalDataVo;

/**
 * 公务员考生科目成绩Mapper接口
 * 
 * @author admin
 * @date 2021-09-09
 */
public interface ServantExamineeSubjectGradeMapper
{
    /**
     * 查询公务员考生科目成绩
     *
     * @param id 公务员考生科目成绩ID
     * @return 公务员考生科目成绩
     */
    public ServantExamineeSubjectGrade selectServantExamineeSubjectGradeById(String id);

    /**
     * 查询公务员考生科目成绩列表
     *
     * @param servantExamineeSubjectGrade 公务员考生科目成绩
     * @return 公务员考生科目成绩集合
     */
    public List<ServantExamineeSubjectGrade> selectServantExamineeSubjectGradeList(ServantExamineeSubjectGrade servantExamineeSubjectGrade);

    /**
     * 新增公务员考生科目成绩
     *
     * @param servantExamineeSubjectGrade 公务员考生科目成绩
     * @return 结果
     */
    public int insertServantExamineeSubjectGrade(ServantExamineeSubjectGrade servantExamineeSubjectGrade);

    /**
     * 修改公务员考生科目成绩
     *
     * @param servantExamineeSubjectGrade 公务员考生科目成绩
     * @return 结果
     */
    public int updateServantExamineeSubjectGrade(ServantExamineeSubjectGrade servantExamineeSubjectGrade);

    /**
     * 删除公务员考生科目成绩
     *
     * @param id 公务员考生科目成绩ID
     * @return 结果
     */
    public int deleteServantExamineeSubjectGradeById(String id);

    /**
     * 批量删除公务员考生科目成绩
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteServantExamineeSubjectGradeByIds(String[] ids);

    /**
     * 获取是否删除考生信息状态
     * @param examineeId 考生ID
     * @param subjectId 科目ID
     * @return 结果
     */
    Integer getIsDelExamineeInfoStatus(@Param("examineeId") String examineeId, @Param("subjectId") String subjectId);

    /**
     * 新增批量公务员考生科目成绩
     * @param list 公务员考生科目成绩
     * @return 结果
     */
    Integer insertBatchServantExamineeSubjectGrade(List<ServantExamineeSubjectGrade> list);

    /**
     * 新增或更新批量公务员考生科目成绩
     * @param list 公务员考生科目成绩
     * @return 结果
     */
    Integer insertOrUpdateBatchServantExamineeSubjectGrade(List<ServantExamineeSubjectGrade> list);

    /**
     * 更新批量公务员考生科目成绩
     * @param list 公务员考生科目成绩
     * @return 结果
     */
    Integer updateBatchServantExamineeSubjectGrade(List<ServantExamineeSubjectGrade> list);

    String queryMinScore(ExamScoreLineReq examScoreLineReq);

    Double getAvgScore(Map paramMap);

    /**
     * 总实考生人数
     * @param examId 考试id
     * @return
     */
    long countActualExamNumByExamId(@Param("examId") String examId);

    Integer countRealNumByPost(@Param("examId")String examId, @Param("zwdm")String zwdm);

    List<GradeAnalysisTotalDataVo> countServantPassByExamIdAndSex(@Param("examId") String examId);

}
